/***IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'ustUser')
CREATE USER [pumaUser] FOR LOGIN [pumaUser] WITH DEFAULT_SCHEMA=[dbo] ***/
/* For security reasons the login is created disabled and with a random password. */
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'ustUser')
CREATE LOGIN [ustUser] WITH PASSWORD=N'ustUser', DEFAULT_DATABASE=[HKUST_Inv_Sys], DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
GO
ALTER LOGIN [ustUser] ENABLE
GO
USE HKUST_Inv_Sys
CREATE USER [ustUser] FOR LOGIN [ustUser] WITH DEFAULT_SCHEMA=[dbo]
GO